package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * Sb generated by hbm2java
 */
@Entity
@Table(name = "sb")
public class Sb implements java.io.Serializable
{

    private Long id;
    private int version;
    private Jbqk jbqk;
    private String username;
    private String operation;
    private Date optdate;
    private String sbfl;
    private String sbmc;
    private Long sl;
    private BigDecimal grjz;
    private Date grsj;
    private Short sjsm;
    private String xntd;
    private String cd;
    private Short xh;

    public Sb()
    {
    }

    public Sb( Long id, String sbfl )
    {
        this.id = id;
        this.sbfl = sbfl;
    }

    public Sb( Long id,
               Jbqk jbqk,
               String username,
               String operation,
               Date optdate,
               String sbfl,
               String sbmc,
               Long sl,
               BigDecimal grjz,
               Date grsj,
               Short sjsm,
               String xntd,
               String cd,
               Short xh )
    {
        this.id = id;
        this.jbqk = jbqk;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.sbfl = sbfl;
        this.sbmc = sbmc;
        this.sl = sl;
        this.grjz = grjz;
        this.grsj = grsj;
        this.sjsm = sjsm;
        this.xntd = xntd;
        this.cd = cd;
        this.xh = xh;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "jbq_ID")
    public Jbqk getJbqk()
    {
        return this.jbqk;
    }

    public void setJbqk( Jbqk jbqk )
    {
        this.jbqk = jbqk;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "sbfl", nullable = false, length = 50)
    public String getSbfl()
    {
        return this.sbfl;
    }

    public void setSbfl( String sbfl )
    {
        this.sbfl = sbfl;
    }

    @Column(name = "sbmc", length = 50)
    public String getSbmc()
    {
        return this.sbmc;
    }

    public void setSbmc( String sbmc )
    {
        this.sbmc = sbmc;
    }

    @Column(name = "sl")
    public Long getSl()
    {
        return this.sl;
    }

    public void setSl( Long sl )
    {
        this.sl = sl;
    }

    @Column(name = "grjz", precision = 10)
    public BigDecimal getGrjz()
    {
        return this.grjz;
    }

    public void setGrjz( BigDecimal grjz )
    {
        this.grjz = grjz;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "grsj", length = 23)
    public Date getGrsj()
    {
        return this.grsj;
    }

    public void setGrsj( Date grsj )
    {
        this.grsj = grsj;
    }

    @Column(name = "sjsm")
    public Short getSjsm()
    {
        return this.sjsm;
    }

    public void setSjsm( Short sjsm )
    {
        this.sjsm = sjsm;
    }

    @Column(name = "xntd", length = 100)
    public String getXntd()
    {
        return this.xntd;
    }

    public void setXntd( String xntd )
    {
        this.xntd = xntd;
    }

    @Column(name = "cd", length = 20)
    public String getCd()
    {
        return this.cd;
    }

    public void setCd( String cd )
    {
        this.cd = cd;
    }

    @Column(name = "xh")
    public Short getXh()
    {
        return this.xh;
    }

    public void setXh( Short xh )
    {
        this.xh = xh;
    }

}
